package com.ruoyi.system.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ReportSettingMapper;
import com.ruoyi.system.domain.ReportSetting;
import com.ruoyi.system.service.IReportSettingService;

/**
 * 举报设置Service业务层处理
 * 
 * @author DEREK
 * @date 2023-08-10
 */
@Service
public class ReportSettingServiceImpl extends ServiceImpl<ReportSettingMapper, ReportSetting> implements IReportSettingService 
{
    @Autowired
    private ReportSettingMapper reportSettingMapper;

    /**
     * 查询举报设置
     * 
     * @param id 举报设置主键
     * @return 举报设置
     */
    @Override
    public ReportSetting selectReportSettingById(Long id)
    {
        return reportSettingMapper.selectReportSettingById(id);
    }

    /**
     * 查询举报设置列表
     * 
     * @param reportSetting 举报设置
     * @return 举报设置
     */
    @Override
    public List<ReportSetting> selectReportSettingList(ReportSetting reportSetting)
    {
        return reportSettingMapper.selectReportSettingList(reportSetting);
    }

    /**
     * 新增举报设置
     * 
     * @param reportSetting 举报设置
     * @return 结果
     */
    @Override
    public int insertReportSetting(ReportSetting reportSetting)
    {
        reportSetting.setCreateTime(DateUtils.getNowDate());
        return reportSettingMapper.insertReportSetting(reportSetting);
    }

    /**
     * 修改举报设置
     * 
     * @param reportSetting 举报设置
     * @return 结果
     */
    @Override
    public int updateReportSetting(ReportSetting reportSetting)
    {
        reportSetting.setUpdateTime(DateUtils.getNowDate());
        return reportSettingMapper.updateReportSetting(reportSetting);
    }

    /**
     * 批量删除举报设置
     * 
     * @param ids 需要删除的举报设置主键
     * @return 结果
     */
    @Override
    public int deleteReportSettingByIds(Long[] ids)
    {
        return reportSettingMapper.deleteReportSettingByIds(ids);
    }

    /**
     * 删除举报设置信息
     * 
     * @param id 举报设置主键
     * @return 结果
     */
    @Override
    public int deleteReportSettingById(Long id)
    {
        return reportSettingMapper.deleteReportSettingById(id);
    }
}
